using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Data.Entity;
//using System.Transactions;
//using br.com.autotrac.logcenter.Common.Util;
//using br.com.autotrac.logcenter.DAO.EntityFramework;

namespace br.com.autotrac.logcenter.DAO.Repository
{
    public interface IRepository<T>
         where T : class
    {
        void Insert(T entity);

        void Update(T entity);

        void Delete(T entity);

        T FirstOrDefault(Expression<Func<T, bool>> expression, params string[] navigations);

        IQueryable<T> Query(params string[] navigations);
        //IQueryable<T> PagedQuery(IQueryable<T> entities, DataPager<T> pager);

        bool Any(Expression<Func<T, bool>> expression, params string[] navigations);
    }
}
